package cc.catface.app_kotlin_demo

/**
 * 集合(set、list、map、、序列sequence)
 * @tip 声明mutable可变集合时可使用var或者val-因为操作可变集合对象所以引用不变
 */

fun main() {

    val l1 = listOf("alistar", "akali")
    val s1 = setOf("amumu", "annie")
    val m1 = mapOf("k1" to "v1", "k2" to "v2")

    //空集合
    val el1 = emptyList<String>()

    val ln1 = listOfNotNull(3)

    //mutable可变集合
    val ml1 = mutableListOf("alistar", "akali")
    ml1.add("annie")

    val sq1 = sequenceOf(1, 3, 4, "")

    //取值可简写l1.get(0) => l1[0]

}

class Gather {
}